*Black, Owens, Wedeking & Wohlfarth
*Chapter 10 Replication


use "Ch-10_Data.dta"

*Table 10.1

*Model 1
logit strongnega consciPI_median openPI_median extraPI_median agreePI_median neuroPI_median, robust cl(precus1)

*Model 2
logit strongnega consciPI_median openPI_median extraPI_median agreePI_median neuroPI_median medndif2 vitality ideovital numspconc votemargin totalinterp numval complexity amiciz nyt1 percuriam constissue prevoverturnnew age1 age1sq, robust cl(precus1)

*Model 3
logit weaknega consciPI_median openPI_median extraPI_median agreePI_median neuroPI_median, robust cl(precus1)

*Model 4
logit weaknega consciPI_median openPI_median extraPI_median agreePI_median neuroPI_median medndif2 vitality ideovital numspconc votemargin totalinterp numval complexity amiciz nyt1 percuriam constissue prevoverturnnew age1 age1sq, robust cl(precus1)

*Model 5
logit postreata consciPI_median openPI_median extraPI_median agreePI_median neuroPI_median, robust cl(precus1)

*Model 6
logit postreata consciPI_median openPI_median extraPI_median agreePI_median neuroPI_median medndif2 vitality ideovital numspconc votemargin totalinterp numval complexity amiciz nyt1 percuriam constissue prevoverturnnew age1 age1sq, robust cl(precus1)

*Figure 10.1(a)
logit strongnega consciPI_median openPI_median extraPI_median agreePI_median neuroPI_median medndif2 vitality ideovital numspconc votemargin totalinterp numval complexity amiciz nyt1 percuriam constissue prevoverturnnew age1 age1sq, robust cl(precus1)
quietly margins, at(consciPI_median=(-0.83(.04)-0.07))
marginsplot, xlabel(-0.83(.12)-0.07) plotopt(msymbol(none)) ciopts(color(gs10)) recastci(rarea) level(90) xtitle(Median Conscientiousness Score) ytitle(Probability of a Strong Negative Interpretation) title("") scheme(s1mono)

*Figure 10.1(b)
logit weaknega consciPI_median openPI_median extraPI_median agreePI_median neuroPI_median medndif2 vitality ideovital numspconc votemargin totalinterp numval complexity amiciz nyt1 percuriam constissue prevoverturnnew age1 age1sq, robust cl(precus1)
quietly margins, at(consciPI_median=(-0.83(.04)-0.07))
marginsplot, xlabel(-0.83(.12)-0.07) plotopt(msymbol(none)) ciopts(color(gs10)) recastci(rarea) level(90) xtitle(Median Conscientiousness Score) ytitle(Probability of a Weak Negative Interpretation) title("") scheme(s1mono)

*Figure 10.1(c)
logit postreata consciPI_median openPI_median extraPI_median agreePI_median neuroPI_median medndif2 vitality ideovital numspconc votemargin totalinterp numval complexity amiciz nyt1 percuriam constissue prevoverturnnew age1 age1sq, robust cl(precus1)
quietly margins, at(consciPI_median=(-0.83(.04)-0.07))
marginsplot, xlabel(-0.83(.12)-0.07) plotopt(msymbol(none)) ciopts(color(gs10)) recastci(rarea) level(90) xtitle(Median Conscientiousness Score) ytitle(Probability of a Positive Interpretation) title("") scheme(s1mono)


*Table 10.2

*Model 1
logit strongnega c.consciPI_median##c.medndif2 c.consciPI_median##c.vitality c.medndif2##c.vitality openPI_median extraPI_median agreePI_median neuroPI_median, robust cl(precus1)

*Model 2
logit strongnega c.consciPI_median##c.medndif2 c.consciPI_median##c.vitality c.medndif2##c.vitality openPI_median extraPI_median agreePI_median neuroPI_median numspconc votemargin totalinterp numval complexity amiciz nyt1 percuriam constissue prevoverturnnew age1 age1sq, robust cl(precus1)

*Model 3
logit weaknega c.consciPI_median##c.medndif2 c.consciPI_median##c.vitality c.medndif2##c.vitality openPI_median extraPI_median agreePI_median neuroPI_median, robust cl(precus1)

*Model 4
logit weaknega c.consciPI_median##c.medndif2 c.consciPI_median##c.vitality c.medndif2##c.vitality openPI_median extraPI_median agreePI_median neuroPI_median numspconc votemargin totalinterp numval complexity amiciz nyt1 percuriam constissue prevoverturnnew age1 age1sq, robust cl(precus1)

*Model 5
logit postreata c.consciPI_median##c.medndif2 c.consciPI_median##c.vitality c.medndif2##c.vitality openPI_median extraPI_median agreePI_median neuroPI_median, robust cl(precus1)

*Model 6
logit postreata c.consciPI_median##c.medndif2 c.consciPI_median##c.vitality c.medndif2##c.vitality openPI_median extraPI_median agreePI_median neuroPI_median numspconc votemargin totalinterp numval complexity amiciz nyt1 percuriam constissue prevoverturnnew age1 age1sq, robust cl(precus1)

*Figure 10.2(a)
logit strongnega c.consciPI_median##c.medndif2 c.consciPI_median##c.vitality c.medndif2##c.vitality openPI_median extraPI_median agreePI_median neuroPI_median numspconc votemargin totalinterp numval complexity amiciz nyt1 percuriam constissue prevoverturnnew age1 age1sq, robust cl(precus1)
quietly margins, at(consciPI_median=(-0.83(.04)-0.07) medndif2=(0.40 27.05))
marginsplot, xlabel(-0.83(.12)-0.07) ylabel(0(.002).006) plotopt(msymbol(none)) noci xtitle(Median Conscientiousness Score) ytitle(Probability of a Strong Negative Interpretation) title("") scheme(s1mono) legend(order(1 "Low Ideological Distance"  2 "High Ideological Distance"))

*Figure 10.2(b)
quietly margins, dydx(medndif2) at(consciPI_median=(-.83(.04)-.07))
marginsplot, xlabel(-0.83(.12)-0.07) plotopt(msymbol(none)) ciopts(color(gs10)) ylin(0) recastci(rarea) level(90) xtitle(Median Conscientiousness Score) ytitle(Average Marginal Effect of Ideological Distance) title("") scheme(s1mono)

*Figure 10.3(a)
logit weaknega c.consciPI_median##c.medndif2 c.consciPI_median##c.vitality c.medndif2##c.vitality openPI_median extraPI_median agreePI_median neuroPI_median numspconc votemargin totalinterp numval complexity amiciz nyt1 percuriam constissue prevoverturnnew age1 age1sq, robust cl(precus1)
quietly margins, at(consciPI_median=(-0.83(.04)-0.07) medndif2=(0.40 27.05))
marginsplot, xlabel(-0.83(.12)-0.07) ylabel(.015(.005).03) plotopt(msymbol(none)) noci xtitle(Median Conscientiousness Score) ytitle(Probability of a Weak Negative Interpretation) title("") scheme(s1mono) legend(order(1 "Low Ideological Distance"  2 "High Ideological Distance"))

*Figure 10.3(b)
quietly margins, dydx(medndif2) at(consciPI_median=(-.83(.04)-.07))
marginsplot, xlabel(-0.83(.12)-0.07) plotopt(msymbol(none)) ciopts(color(gs10)) ylin(0) recastci(rarea) level(90) xtitle(Median Conscientiousness Score) ytitle(Average Marginal Effect of Ideological Distance) title("") scheme(s1mono) 

*Figure 10.4(a)
logit postreata c.consciPI_median##c.medndif2 c.consciPI_median##c.vitality c.medndif2##c.vitality openPI_median extraPI_median agreePI_median neuroPI_median numspconc votemargin totalinterp numval complexity amiciz nyt1 percuriam constissue prevoverturnnew age1 age1sq, robust cl(precus1)
quietly margins, at(consciPI_median=(-0.83(.04)-0.07) medndif2=(0.40 27.05))
marginsplot, xlabel(-0.83(.12)-0.07) ylabel(.012(.002).022) plotopt(msymbol(none)) noci xtitle(Median Conscientiousness Score) ytitle(Probability of a Positive Interpretation) title("") scheme(s1mono) legend(order(1 "Low Ideological Distance"  2 "High Ideological Distance"))

*Figure 10.4(b)
quietly margins, dydx(medndif2) at(consciPI_median=(-.83(.04)-.07))
marginsplot, xlabel(-0.83(.12)-0.07) plotopt(msymbol(none)) ciopts(color(gs10)) ylin(0) recastci(rarea) level(90) xtitle(Median Conscientiousness Score) ylabel(,angle()) ytitle(Average Marginal Effect of Ideological Distance) title("") scheme(s1mono)

*Figure 10.5(a)
logit strongnega c.consciPI_median##c.medndif2 c.consciPI_median##c.vitality c.medndif2##c.vitality openPI_median extraPI_median agreePI_median neuroPI_median numspconc votemargin totalinterp numval complexity amiciz nyt1 percuriam constissue prevoverturnnew age1 age1sq, robust cl(precus1)
quietly margins, dydx(vitality) at(consciPI_median=(-.83(.04)-.07))
marginsplot, xlabel(-0.83(.12)-0.07) plotopt(msymbol(none)) ciopts(color(gs10)) ylin(0) recastci(rarea) level(90) xtitle(Median Conscientiousness Score) ytitle(Average Marginal Effect of Precedent Vitality) title("") scheme(s1mono)

*Figure 10.5(b)
logit weaknega c.consciPI_median##c.medndif2 c.consciPI_median##c.vitality c.medndif2##c.vitality openPI_median extraPI_median agreePI_median neuroPI_median numspconc votemargin totalinterp numval complexity amiciz nyt1 percuriam constissue prevoverturnnew age1 age1sq, robust cl(precus1)
quietly margins, at(consciPI_median=(-0.83(.04)-0.07) vitality=(-2 2))
marginsplot, xlabel(-0.83(.12)-0.07) ylabel(.01(.005).025) plotopt(msymbol(none)) noci xtitle(Median Conscientiousness Score) ytitle(Probability of a Weak Negative Interpretation) title("") scheme(s1mono) legend(order(1 "Low Vitality" 2 "High Vitality"))

*Figure 10.5(c)
quietly margins, dydx(vitality) at(consciPI_median=(-.83(.04)-.07))
marginsplot, xlabel(-0.83(.12)-0.07) plotopt(msymbol(none)) ciopts(color(gs10)) ylin(0) recastci(rarea) level(90) xtitle(Median Conscientiousness Score) ytitle(Average Marginal Effect of Precedent Vitality) title("") scheme(s1mono) 

*Figure 10.5(d)
logit postreata c.consciPI_median##c.medndif2 c.consciPI_median##c.vitality c.medndif2##c.vitality openPI_median extraPI_median agreePI_median neuroPI_median numspconc votemargin totalinterp numval complexity amiciz nyt1 percuriam constissue prevoverturnnew age1 age1sq, robust cl(precus1)
quietly margins, at(consciPI_median=(-0.83(.04)-0.07) vitality=(-2 2))
marginsplot, xlabel(-0.83(.12)-0.07) ylabel(.01(.005).025) plotopt(msymbol(none)) noci xtitle(Median Conscientiousness Score) ytitle(Probability of a Positive Interpretation) title("") scheme(s1mono) legend(order(1 "Low Vitality" 2 "High Vitality"))

*Figure 10.5(e)
quietly margins, dydx(vitality) at(consciPI_median=(-.83(.04)-.07))
marginsplot, xlabel(-0.83(.12)-0.07) plotopt(msymbol(none)) ciopts(color(gs10)) ylin(0) recastci(rarea) level(90) xtitle(Median Conscientiousness Score) ytitle(Average Marginal Effect of Precedent Vitality) title("") scheme(s1mono) 

